package org.gy.T4.c;

public class Student1 {
    //实例变量
    public int age;
    //实例代码块：实例代码块会执⾏在每⼀个构造⽅法之前
    {
        System.out.println("实例代码块执⾏了~~");
        age = 18;
        System.out.println("有⼈创建了对象：" + this);
    }
    public Student1(){
        System.out.println("⽆参数构造器执⾏了~~");
    }
    public Student1(String name){
        System.out.println("有参数构造器执⾏了~~");
    }
}
